<?php

$uchecked= mysql_query("SELECT * FROM cms_usertests WHERE game='$CMS_pref' and username='".USERNAME."' ORDER BY rate DESC LIMIT 1");
if(mysql_num_rows($uchecked)==0){
	header ("Location: ratinguser-test.php?game=$CMS_game");
}
else {
	$uchecked= mysql_fetch_assoc($uchecked);
	if((int)$uchecked["rate"]>0) {}
	elseif((int)$uchecked["rate"]==0 and (int)$uchecked["rate"]!=-1){
		header ("Location: ratinguser-alert.php?game=$CMS_game&a=1");
	}
	elseif((int)$uchecked["rate"]==-1){
		header ("Location: ratinguser-alert.php?game=$CMS_game&a=2");
	}
}

?>